<template>
    <div class="wrapper">
        <select-audience type="edit"/>
        <budget-schedule v-if="this.$route.query.adPlatform=='Facebook'" type="edit" />
        <gg-budget-schedule v-else type="edit" />
    </div>
</template>

<script>
    import Vue from 'vue'
    import SelectAudience from '~components/create/selectAudience.vue'
    import BudgetSchedule from '~components/create/budget-schedule.vue'
    import GgBudgetSchedule from '~components/create/google-budget.vue'

    import { mapGetters, mapMutations} from 'vuex';

    export default {
        components: {
            SelectAudience,
            BudgetSchedule,
            GgBudgetSchedule
        },
        head() {
            return {
                title: this.title
            }
        },
        data() {
            return {
                title: '广告组编辑',
                budgetData:{},
                localId:'',
                platFormId:''
            };
        },
        computed: {
            ...mapGetters([
                "editAudienceForm",
                "budgetSchedule",
                "adverLayout",
                "adPlatform"
            ])
        },
        created(){
            let item = this.$route.query.adPlatform;
            this.title = item == 'Facebook'?'Facebook广告组编辑':'Google广告组编辑'
            this.$store.commit('AD_PLATFORM', {item});
        },

        methods: {

        }
    }
</script>

<style lang="scss">
    .wrapper{
        padding: 0 58px 50px;
        background-color: #fff;
        min-height: 594px;
    }
    .bottom-btn{
        width: 250px;
        margin-left: 115px;
    }
</style>